//
//  LGSportsEvaChartController.m
//  HeartDiseaseManage
//
//  Created by 1234 on 2023/8/11.
//  运动评估统计图

#import "LGSportsEvaChartController.h"
#import "LGSportsEvaDetailChartView.h"
@interface LGSportsEvaChartController ()

/**   */
@property (nonatomic , strong)LGSportsEvaDetailChartView *chartView;

@end

@implementation LGSportsEvaChartController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.title = @"数据趋势";
    [self.view addSubview:self.chartView];
    [self requestData];
}

-(void)requestData{
    [RequestUtil withPOST:@"/doctor/sport.estimate/cpetReportChart" parameters:@{@"patient_id":self.patientid,@"title":self.name,@"data_type":self.type} withSign:YES success:^(NSInteger code, NSString *message, id returnData) {
        if(code == 200){
            self.chartView.dataDic = returnData;
        }
    } error:^(NSError *error) {
        
    }];
}

-(LGSportsEvaDetailChartView *)chartView{
    if(!_chartView){
        _chartView = [[LGSportsEvaDetailChartView alloc]initWithFrame:CGRectMake(viewPix(16), viewPix(16), Screen_W-viewPix(32), viewPix(260))];
        [_chartView setShadoWithColor:@"#B2BDC7" offset:CGSizeMake(0, 2) opacity:0.15 radius:15];
        _chartView.backgroundColor = [UIColor whiteColor];
    }
    return _chartView;
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
